<?php

class Site_model extends Model{

	var $table_name = 'site';
	
	function Site_model()
	{
		parent::Model();
	}
	
	function get_data($field,$id)
	{
		$this->db->select($field);
		$this->db->where('id', $id);
		$this->db->limit(1);
		
		$query = $this->db->get($this->table_name);
		
		if($query->num_rows() > 0)
		{
			$data = $query->row_array(); 
		}
		

		$query->free_result();
		
		return $data;	
	}

	function get_row($field,$id)
	{
		$data = array();
		$this->db->select($field);
		$this->db->where('id', $id);
		$query = $this->db->get($this->table_name,1);
		
		if($query->num_rows() > 0)
		{
			$data = $query->row_array();
		}	
		//print_r($this->db->last_query());	
		$query->free_result();
		return $data;
	}
	
}

/* End of file site_model.php */
/* Location: ./system/application/models/site_model.php */
?>